<% 
#locals
article=item || @article

#cache tag
tag=@tag
begin
  tag = Tag.find(article.tag_id) if tag.nil?
rescue
end

#cached person
person=@person || article.person
%>
      <table class="ContentBlock" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left" valign="top">
          <a href="<%= cat_blog_path(@cat_id,article.id) %>">
          	<% unless article.media_url.blank? %>
	<img alt="" title="" border="0"  src="<%=h article.media_url%>">
	<% end %>
          </a>
          <%- unless tag.nil? -%>
          <a class="ContentLable" href='<%= blogs_cat_tag_path(@cat_id,article.tag_id) %>'><%=h tag.name %></a>
          <%- end -%>
              <h3><a href="<%= cat_blog_path(@cat_id,article.id) %>" class="ContentTitle"><%= h(article.title) %></a></h3>
          <%= textilize article.synopsis%> <a href="<%= cat_blog_path(@cat_id,article.id) %>" class="blue">[More]</a></td>
          <td width="300" align="left" valign="top"><dl>
		    <%- if logged_in? && (current_person?(person)||current_person.admin?) -%>
		      <dt> <%= link_to "Edit", edit_cat_blog_path(@cat_id,article) %>
		      | <%= link_to "Delete", blog_path(article),
		                              :method => :delete %>
		      </dt>
		    <%- end -%>
            <dt>Posted <%= time_ago_in_words article.created_at  %> ago</dt>
            <dt>By <a href="<%=blogs_cat_person_path(@cat_id,person)%>" class="blue"><%= person.name %></a></dt>

            <dt><a href="<%= cat_blog_path(@cat_id,article.id) %>" class="blue"><%= article.view_count %></a> views, <a href="<%= cat_blog_path(@cat_id,article.id) %>#comments" class="blue"><%= article.article_comments_count %></a> Comments</dt>
    <% unless article.most_recent_comment.nil? %>
                <dt>
					<div id='article_comment<%=article.most_recent_comment.id%>'>
					<div>Commented at <%= time_ago_in_words article.most_recent_comment.created_at  %> ago by <a href="#" class="blue"><%= article.most_recent_comment.commenter.name %></a></div>
					<a class=Pink href=#>
						<div>
						<%= display article.most_recent_comment.body%>
						</div>
					</a>
					</div> 
                </dt>
    <% end %>
          </dl></td>
        </tr>
      </table>